import collections
class Solution(object):
    def findLucky(self, arr):
        c = collections.Counter(arr)
        out = -1
        for key in c:
            if key == c[key]:
                out = max(out, key)
        return out